﻿using System;
using System.Reflection;

namespace AbstructFactory
{
    public  abstract class AbsFactory
    {
        private static readonly string ServiceName = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["ServiceName"]);
        public static AbsFactory CreateInterface()
         
        {
            Assembly ass = Assembly.Load("XF.Meeting.ServiceFactory");
            object obj = ass.CreateInstance(string.Format("XF.Meeting.ServiceFactory.{0}", ServiceName));
            return obj as AbsFactory;

        }
  
    }
}
